<%@page import="model.User"%>
<%@page language="java"%>

<div id="header">
	<h1>Virtual Intranet Library</h1>
	<div id="nav">
		<%
		    User user = (User) session.getAttribute("user");
		    if (user == null)
		    {
				response.sendRedirect("login.jsp");
				return;
		    }
		    if (user != null)
		    {
		%>
		
		Hello, <%=user.getUsername()%> | 
		<a href="home.jsp">Home</a> |
		<a href="editProfile.jsp">Edit profile</a> |
		<a href="changePassword.jsp">Change password</a> |		
		<a href="logout.jsp">Log out</a>

		<%
		    }
		%>
	</div>
</div>